Create the Datasets
Four datasets will be created and named empl_phone, empl_email, Emergency, and Dependents. This procedure will walk you through creating the dataset for empl_phone. Repeat the procedure for the remaining three datasets.
To add a dataset:
- Click the Show/hide Dataset icon on the Band Report Editor Toolbar. This will show the dataset pane on the right side of the screen.
- Click the blue plus icon on the right to bring up the following dialog box in which you identify the properties of the dataset.
- Name the dataset empl_phone and set the Master Dataset to ArgosData(main). ArgosData(main) is the dataset containing the Main Report query.
- Click the Build Query icon to bring up the Build Query dialog box. (This dialog builds the SQL query for your dataset.)
- Click the Show Tables button, then select the Employee_Phone table.
- In the Employee_Phone table, double-click on the phone_type and phone_number fields which will place them into the tables at the bottom of the Build Query window.
You will need to build the conditional (WHERE) clause next. The WHERE clause is utilized to link the emp_id field in this table to the emp_id field within the Employees table in the Main DataBlock.
- Click on the Conditional Fields (WHERE) tab.
- In the Employee_Phone table, double-click emp_id to populate the and/or, table, and field fields.
- In the Condition field, click the ellipses button to open the SQL Editor window. (This is where you link the emp_id field in this table to the emp_id field within the Employees table in the Main DataBlock.)
- Click the variable button to launch the Pick a variable dialog.
- Click the plus icon next to ArgosData to expand it.
- Select emp_id from the list of variables.
- Click OK to return to the SQL Editor. The variable ArgosData.emp_id is now in the text field of the SQL Editor.
- Click OK to return to the Build Query Window. All of the conditional fields are now populated.
- Click OK to return to the Edit Dataset dialog. You will see the completed SQL query in the SQL text field.
- Click OK to exit the dialog.
- Click Yes to validate the query, then enter a test value for emp_id when prompted.
After the query is validated, you will be returned to the Banded Report Editor. The dataset you just created now appears in the Dataset pane on the right side of the window.
Use the above procedure to create the remaining datasets. Click the blue plus icon to start creating the next dataset.
- Use the Employee_Email table for the dataset named empl_email.
- Use the Employee_Emerg_Contact table for the dataset named Emergency.
- Use the Employee_Dependents table for the dataset named Dependents.
When you have finished creating the datasets, they will be displayed in the dataset pane on the Band Report Editor.